<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>管理员页面</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body style="background: #083846">
	<div style="height: 80" align="center">
		<font color="#878787" size="10">管理员后台程序</font>
	</div>
	<hr>
	<div>
		<div
			style="float: left;width: 200;height:500; border-right:1px solid white"
			align="center">
			<ul>
				<li><a
					href="${pageContext.request.contextPath }/applicantAction_showAll.action"><font
						color="#878787" size="3">查看所有报名信息</font> </a>
				</li>
				<li></li>
				<li><a><font color="#878787" size="3">按职位分类查信息</font> </a>
					<ul>
						<c:forEach items="${applicationScope.positions}" var="position">
							<c:if test="${position.parentPosition==null }">
								<li><a
									href="${pageContext.request.contextPath }/applicantAction_showByPositionId.action?id=${position.id}"><font
										color="#878787" size="3">${position.name }</font> </a> <c:forEach
										items="${applicationScope.positions}" var="childrenPosition">
										<ul>
											<c:if test="${childrenPosition.parentPosition!=null }">
												<c:if
													test="${position.id==childrenPosition.parentPosition.id }">
													<li><a
														href="${pageContext.request.contextPath }/applicantAction_showByPositionId.action?id=${childrenPosition.id}"><font
															color="#878787" size="3">${ childrenPosition.name}</font>
													</a>
													</li>
												</c:if>
											</c:if>
										</ul>
									</c:forEach></li>
							</c:if>
						</c:forEach>
					</ul>
				</li>
				<li></li>
				<li><a
					href="${pageContext.request.contextPath }/adminAction_setTimeUI.action"><font
						color="#878787" size="3">设置报名截止时间</font> </a>
				</li>
			</ul>
		</div>
		<div align="center">
			<c:if test="${requestScope.setTime==null }">
				<table>
					<c:if test="${requestScope.applicants!=null }">
						<tr>
							<td><font color="#878787" size="3">姓名</font>
							<td>
							<td><font color="#878787" size="3">年龄</font>
							<td>
							<td><font color="#878787" size="3">学号</font>
							<td>
							<td><font color="#878787" size="3">所修专业</font>
							<td>
							<td><font color="#878787" size="3">所在年级</font>
							<td>
							<td><font color="#878787" size="3">应聘职位</font>
							<td>
							<td><font color="#878787" size="3">电话号码</font>
							<td>
							<td><font color="#878787" size="3">电子邮件</font>
							<td>
							<td><font color="#878787" size="3">详细</font>
							<td>
						</tr>
						<c:forEach items="${requestScope.applicants }" var="applicant">
							<tr>
								<td><font color="#878787" size="3">${applicant.name
										} </font>
								<td>
								<td><font color="#878787" size="3">${applicant.age }</font>
								<td>
								<td><font color="#878787" size="3">${applicant.rollNumber
										}</font>
								<td>
								<td><font color="#878787" size="3">${applicant.major
										}</font>
								<td>
								<td><font color="#878787" size="3">${applicant.grade
										}</font>
								<td>
								<td><font color="#878787" size="3">${applicant.position.name
										}</font>
								<td>
								<td><font color="#878787" size="3">${applicant.phoneNumber
										}</font>
								<td>
								<td><font color="#878787" size="3">${applicant.email
										}</font>
								<td>
								<td><c:url
										value="${pageContext.request.contextPath }/applicantAction_detail.action"
										var="detail">
										<c:param name="id" value="${applicant.id}"></c:param>
									</c:url> <a href="${detail }"><font color="#878700" size="3">查看</font>
								</a>
								<td>
							</tr>
						</c:forEach>
					</c:if>
				</table>
			</c:if>
			<c:if test="${requestScope.setTime !=null }">
				<h1>
					<font color="#878700" size="3">报名截止时间设置</font>
				</h1>
				<form action="${pageContext.request.contextPath }/adminAction_setTime.action" method="post">
					<select style="width: 120;height: 20" name="year">
						<option>2010</option>
						<option>2011</option>
						<option>2012</option>
						<option>2013</option>
						<option>2014</option>
						<option>2015</option>
						<option>2016</option>
						<option>2017</option>
						<option>2018</option>
						<option>2019</option>
						<option>2020</option>
					</select> <select style="width: 120;height: 20" name="month">
						<option>1</option>
						<option>2</option>
						<option>3</option>
						<option>4</option>
						<option>5</option>
						<option>6</option>
						<option>7</option>
						<option>8</option>
						<option>9</option>
						<option>10</option>
						<option>11</option>
						<option>12</option>
					</select> <select style="width: 120;height: 20" name="day">
						<option>1</option>
						<option>2</option>
						<option>3</option>
						<option>4</option>
						<option>5</option>
						<option>6</option>
						<option>7</option>
						<option>8</option>
						<option>9</option>
						<option>10</option>
						<option>11</option>
						<option>12</option>
						<option>13</option>
						<option>14</option>
						<option>15</option>
						<option>16</option>
						<option>17</option>
						<option>18</option>
						<option>19</option>
						<option>20</option>
						<option>21</option>
						<option>22</option>
						<option>23</option>
						<option>24</option>
						<option>25</option>
						<option>26</option>
						<option>27</option>
						<option>28</option>
						<option>29</option>
						<option>30</option>
						<option>31</option>
					</select> <input type="submit" value="确定" />
				</form>
			</c:if>
		</div>
	</div>
</body>
</html>
